﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="Icons/New.xaml"/>
		<ResourceDictionary Source="Icons/Open.xaml"/>
		<ResourceDictionary Source="Icons/Save.xaml"/>
		<ResourceDictionary Source="Icons/Options.xaml"/>
		<ResourceDictionary Source="Icons/Help.xaml"/>
		<ResourceDictionary Source="Icons/PlayControls.xaml"/>
	</ResourceDictionary.MergedDictionaries>
	
	<ControlTemplate x:Key="IconButton"  TargetType="{x:Type ButtonBase}">
		<Image x:Name="image" Source="{TemplateBinding Property=Content}"
       Margin="5,12,5,12"
       HorizontalAlignment="Stretch"
       VerticalAlignment="Stretch" Stretch="Uniform" ClipToBounds="False">
		</Image>
		<ControlTemplate.Triggers>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="BitmapEffect">
					<Setter.Value>
						<DropShadowBitmapEffect ShadowDepth="3" Direction="-45" Color="Black" Softness="0.2" Opacity="0.7"/>
					</Setter.Value>
				</Setter>
				<Setter Property="RenderTransform">
					<Setter.Value>
						<TranslateTransform X="-1" Y="-1"/>
					</Setter.Value>
				</Setter>
			</Trigger>
			<Trigger Property="IsMouseOver" Value="False">
				<Setter Property="BitmapEffect">
					<Setter.Value>
						<DropShadowBitmapEffect ShadowDepth="1.5" Direction="-45" Color="Black" Softness="0.2"/>
					</Setter.Value>
				</Setter>
			</Trigger>
			<Trigger Property="IsPressed" Value="True">
				<Setter Property="BitmapEffect">
					<Setter.Value>
						<DropShadowBitmapEffect ShadowDepth="0.5" Direction="-45" Color="Black" Softness="0.1"/>
					</Setter.Value>
				</Setter>
				<Setter Property="RenderTransform">
					<Setter.Value>
						<TranslateTransform X="1" Y="1"/>
					</Setter.Value>
				</Setter>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	
	<Style x:Key="IconButtonStyle" TargetType="Button" >
		<Setter Property="Template" Value="{StaticResource IconButton}"/>
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="1.5" ScaleY="1.5" />
            </Setter.Value>
        </Setter>
	</Style>

	<Style x:Key="IconToggleButtonStyle" TargetType="ToggleButton" >
		<Setter Property="Template" Value="{StaticResource IconButton}"/>
		<Setter Property="LayoutTransform">
			<Setter.Value>
				<ScaleTransform ScaleX="1.5" ScaleY="1.5" />
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="NewButton" BasedOn="{StaticResource IconButtonStyle}" TargetType="{x:Type Button}">
		<Setter Property="Content" Value="{StaticResource New_design}"/>
		<Setter Property="ClipToBounds" Value="False"/>
	</Style>
	
	<Style x:Key="OpenButton" BasedOn="{StaticResource IconButtonStyle}" TargetType="{x:Type Button}">
		<Setter Property="Content" Value="{StaticResource Open_design}"/>
	</Style>
	
	<Style x:Key="SaveButton" BasedOn="{StaticResource IconButtonStyle}" TargetType="{x:Type Button}">
		<Setter Property="Content" Value="{StaticResource Save_design}"/>
	</Style>
	
	<Style x:Key="OptionsButton" BasedOn="{StaticResource IconButtonStyle}" TargetType="{x:Type Button}">
		<Setter Property="Content" Value="{StaticResource Options_design}"/>
	</Style>
	
	<Style x:Key="HelpButton" BasedOn="{StaticResource IconButtonStyle}" TargetType="{x:Type Button}">
		<Setter Property="Content" Value="{StaticResource Help_design}"/>
	</Style>
	
	
</ResourceDictionary>